package com.hxzy.research.service.research.impl;

import com.hxzy.research.mapper.TblItemMapper;
import com.hxzy.research.mapper.TblSelectvalueMapper;
import com.hxzy.research.pojo.TblItem;
import com.hxzy.research.pojo.TblSelectvalue;
import com.hxzy.research.service.research.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ItemSrviceImpl implements ItemService{
    @Autowired private TblItemMapper tblItemMapper;
    @Autowired private TblSelectvalueMapper tblSelectvalueMapper;
    @Override
    public void addItem(TblItem tblItem) throws Exception {
        tblItemMapper.addItem(tblItem);
    }

    @Override
    public void addSelectValue(TblSelectvalue tblSelectvalue) throws Exception {
        tblSelectvalueMapper.addSelectValue(tblSelectvalue);
    }

    @Override
    public TblItem findItemIdByName(TblItem tblItem) throws Exception {
        return tblItemMapper.findItemIdByName(tblItem);
    }

    @Override
    public TblItem findItemNameById(Integer id) throws Exception {
        return tblItemMapper.findItemNameById(id);
    }

    @Override
    public void updateItem(TblItem tblItem) throws Exception {
        tblItemMapper.updateItem(tblItem);
    }

    @Override
    public void updateSelectvalue(TblSelectvalue tblSelectvalue) throws Exception {
        tblSelectvalueMapper.updateSelectvalue(tblSelectvalue);
    }

    @Override
    public void deleteSelectvalue(Integer itemId) throws Exception {
        tblSelectvalueMapper.deleteSelectvalue(itemId);
    }

    @Override
    public void deleteItemById(Integer id) throws Exception {
        tblItemMapper.deleteItemById(id);
    }
}
